delimiter $$

CREATE TABLE `relations` (
  `relationId` bigint(20) NOT NULL AUTO_INCREMENT,
  `userId` bigint(20) DEFAULT NULL,
  `relationuserId` bigint(20) DEFAULT NULL,
  `createdDT` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`relationId`),
  KEY `FK_Relations_Users` (`userId`),
  KEY `FK_Relations_RelationUsers` (`relationuserId`),
  CONSTRAINT `FK_Relations_Users` FOREIGN KEY (`userId`) REFERENCES `users` (`userId`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `FK_Relations_RelationUsers` FOREIGN KEY (`relationuserId`) REFERENCES `users` (`userId`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin$$